<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
  <div>
    <p>不负韶华</p>
    <h1>不负韶华</h1>
    <h2>不负韶华</h2>
    <h3>不负韶华</h3>
    <h4>不负韶华</h4>
    <h5>不负韶华</h5>
  </div>
    <div id="counter">
        Counter: {{ counter }}
    </div>
    <div>
        Counter: {{ counter }}
    </div>
</body>
<script src="../js/vue.js"></script>
<script type="application/javascript">
    // let(变量)/const(常量)
    const app = new Vue({
        el: '#counter',  //用于挂载要管理的元素
        data: {  //定义数据
            counter: "你好"
        }
    })
    const obj = {
      aaa() {
        setTimeout(function () {
          setTimeout(function () {
            console.log(this) //window
          })
          setTimeout(() => {
            console.log(this) //window
          })
        })
        setTimeout(() => {
          setTimeout(function () {
            console.log(this) //window
          })
          setTimeout(() => {
            console.log(this.aaa.name) //obj
          })
        })
      }
    }
    obj.aaa()
</script>

</html>
